that it logs everything written to stderr by xc_save and xc_restore as
errors whereas in fact the vast majority of this output is
information/debug (and all actual errors are marked by the string ERROR:
at the start of the message) -- this is confusing to folks looking at
the logs and makes automated log analysis tricky.
Fix is to scan for the ERROR: string and log anything without it using
log.info instead.
Signed-off by: Simon Graham <Simon.Graham@stratus.com>
if line == "":
break
else:
- log.error('%s', line.strip())
+ line = line.strip()
+ m = re.match(r"^ERROR: (.*)", line)
+ if m is None:
+ log.info('%s', line)
+ else:
+ log.error('%s', m.group(1))